<?php if (!defined('BASEPATH')) exit('No direct script access allowed');


class Users_sms_model extends CI_Model
{

	public $user_sms;
	private $CI;
	
	public function __construct()
	{
		parent::__construct();
		$this->CI =& get_instance();
	}
	public function add($user_id,$msg,$service,$money){
		$fields = array('value_userid'=>$user_id,'value_datetime'=>fdate('now'),'value_msg'=>$msg,'value_service'=>$service,'value_money'=>$money);
		$this->db->insert('manager_users_sms',$fields);
		if (isset($this->CI->cache)) {
			$this->CI->cache->file->clean();
		}
		return $this->db->insert_id();
	}
}